/*------------------------------------------------
<> COLOR class
<> 2008.07.31 - Robert Vanca
<> v0.1

Color class.
Features:
	- Operators, intensity, alphablend

TODO:	- code review and better operator code! especially for overflow checking.

--------------------------------------------------*/
#pragma once
#ifndef _BASELIB_COLOR_H
#define _BASELIB_COLOR_H

class COLOR
{
private:
	//inverse RGB
	unsigned char blue;
	unsigned char green;
	unsigned char red;

public:
	COLOR(unsigned char b,unsigned char g,unsigned char r): blue(b),green(g),red(r) {}
	COLOR(): blue(0),green(0),red(0){}
	~COLOR(){}

	COLOR operator*(const COLOR&);
	COLOR operator*(float);
	COLOR operator+(const COLOR&);
	void operator=(const COLOR&);
	COLOR operator*=(float);
	COLOR operator+=(const COLOR& col);
	
	COLOR GetRGB() {return COLOR(red,green,blue);}

	COLOR Intensity(float);
	COLOR AlphaBlend(COLOR& background,float alpha);
};


#endif //_BASELIB_COLOR_H